Fix issue-monster Copilot API error by reducing prompt size#667
Merged
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Reduced workflow prompt size by 33% (from 19KB to 13KB, 434 to 328 lines) to prevent "missing finish_reason for choice 0" error. This error occurs when the Copilot API receives an overly long/complex prompt. Changes: - Consolidated redundant explanations and examples - Streamlined step-by-step instructions - Removed verbose scoring system details (kept reference) - Simplified topic separation guidelines - Maintained all essential logic and requirements The workflow still performs all the same checks (sub-issue relationships, conflict detection, assignment limits) but with more concise instructions. Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix error related to issue monster
Fix issue-monster Copilot API error by reducing prompt size
Feb 4, 2026
Collaborator
|
@copilot only change the .md files. drop updates to the .lock.yml file since it will be regenerated |
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
This PR streamlines the Issue Monster Copilot workflow prompt to avoid Copilot API errors caused by overly large, complex prompts, while keeping the issue selection and assignment behavior intact.
Changes:
- Simplified the Issue Monster agent’s description and workflow from verbose narrative instructions into concise, numbered steps.
- Consolidated the explanation of pre-filtered, scored issues into a short summary while preserving key constraints (no assignees, excluded/campaign labels, no sub-issues, priority ordering).
- Compressed the success criteria and operational guidelines into a shorter checklist that still enforces sub-issue handling, topic separation, and correct use of the
safeoutputstools.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix issue-monster Copilot API error by reducing prompt size ✅
Problem
The issue-monster workflow was failing with error:
This error occurs when the GitHub Copilot API receives an overly long or complex prompt.
Solution
Optimized the workflow prompt by 33%:
Changes
Only .md file modified:
.github/workflows/issue-monster.md- Optimized workflow definition.github/workflows/issue-monster.lock.yml- Reverted (will be regenerated)Optimizations:
Preserved functionality:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.